<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
      
<ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"> 

	<ui:define name="content">
		<h:form id="form">
			<p:panel id="panel" header="Se connecter">
				<p:messages id="msgs" />
					<h:panelGrid columns="3">
					
						<h:outputLabel for="firstname" value="Firstname: *" />
						<p:inputText id="firstname" value="#{login.name}"
							required="true" label="Firstname">
							<f:validateLength minimum="2" />
						</p:inputText>
						<p:message for="firstname" display="icon" />
	
						<h:outputLabel for="password" value="Password: *" />
						<p:password id="password" value="#{login.password}"
							label="password" required="true">
							<f:validateLength minimum="2" />
							<p:ajax update="msgpassword" event="keyup" />
						</p:password>
						<p:message for="password" id="msgpassword" display="icon" />
	
					</h:panelGrid>
				<p:commandButton id="btn" value="Se connecter" update="panel" action="#{login.logUser}" />
			</p:panel>			
		</h:form>
	</ui:define>
	
</ui:composition>
</html>

